﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DynamicDNS.Enom
{
    public class SetDNSHost : Command
    {
        public string IP { get { return InnerText("IP"); } }
        public bool IsUpdated { get; set; }
        public SetDNSHost(IGatewayService service, string hostname, string zone, string domainpassword, string address)
            : base(service)
        {
            Collection.Add("command", typeof(SetDNSHost).Name);
            Collection.Add(GetVariableName(() => hostname), hostname);
            Collection.Add(GetVariableName(() => zone), zone);
            Collection.Add(GetVariableName(() => domainpassword), domainpassword);
            Collection.Add(GetVariableName(() => address), address);
            XmlDoc = Service.Response(this);
            Validate();
        }
        public SetDNSHost(IGatewayService service, string hostname, string zone, string domainpassword)
            : this(service, hostname, zone, domainpassword, "") { }
    }
}
